﻿using AbpToDomain.EntityInfo;
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AbpFluentValidation
{
   public class CreateUpdateBooksValidator: AbstractValidator<Books>
    {

        public CreateUpdateBooksValidator() 
        {
        RuleFor(x=>x.Name).NotNull().Length(3,20). WithMessage("不能为空");
        }

    }
}
